// 定义验证规则
export const rules = {
  name: [
    { required: true, message: "请输入用户名", trigger: "blur" },
    {
      pattern: /^[a-z0-9]{3,10}/,
      message: "用户名是3到10为字母或数字",
      trigger: "blur",
    },
  ],
  password: [
    { required: true, message: "请输入密码", trigger: "blur" },
    {
      pattern: /^[a-z0-9]{6,16}/,
      message: "密码为6到16位字母或数字",
      trigger: "blur",
    },
  ],
}

export const phoneRules = {
  number: [
    { required: true, message: "请输入手机号", trigger: "blur" },
    {
      pattern: /^[0-9]{11}/,
      message: "请输入正确的手机号",
      trigger: "blur",
    },
  ],
}
